package com.entity;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 支付列表对象 pay
 * 
 * @author fafa
 * @date 2024-12-12
 */
@Builder
public class Pay
{

    /** 主键ID */
    private Long id;

    /** 渠道ID */

    private String channelId;

    /** 渠道名称 */

    private String channelName;

    /** 渠道状态： 0 关闭 1开启 */

    private Integer channelStatus;

    /** 商户ID */

    private String merchantId;

    /** 订单交易编号 */

    private String orderNo;

    /** 同步回调url */

    private String syncUrl;

    /** 异步回调url */

    private String asynUrl;

    /** 公钥 */

    private String publicKey;

    /** 私钥 */

    private String privateKey;

    /** 支付金额 */

    private BigDecimal payAmount;

    /** 支付方式 */

    private String paymentMethodId;

    /** 支付状态(官方)  200:成功 300:失败 */

    private Long paymentStatus;

    /** 支付总金额 */
    private BigDecimal paymentFee;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date paymentTime;

    /** 返回结果（响应json格式） */
    private String paymentJson;

    /** 同步通知url(http及时响应) */
    private String notifyUrl;

    /** 交易类型 */
    private String tradeType;

    /** 支付状态,0未支付,1已支付,2支付超时,3支付失败 */
    private Long payStatus;

    /** 二维码路径 */
    private String codeUrl;

    public String getCodeUrl() {
        return codeUrl;
    }

    public void setCodeUrl(String codeUrl) {
        this.codeUrl = codeUrl;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setChannelId(String channelId) 
    {
        this.channelId = channelId;
    }

    public String getChannelId() 
    {
        return channelId;
    }
    public void setChannelName(String channelName) 
    {
        this.channelName = channelName;
    }

    public String getChannelName() 
    {
        return channelName;
    }
    public void setChannelStatus(Integer channelStatus) 
    {
        this.channelStatus = channelStatus;
    }

    public Integer getChannelStatus() 
    {
        return channelStatus;
    }
    public void setMerchantId(String merchantId) 
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId() 
    {
        return merchantId;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setSyncUrl(String syncUrl) 
    {
        this.syncUrl = syncUrl;
    }

    public String getSyncUrl() 
    {
        return syncUrl;
    }
    public void setAsynUrl(String asynUrl) 
    {
        this.asynUrl = asynUrl;
    }

    public String getAsynUrl() 
    {
        return asynUrl;
    }
    public void setPublicKey(String publicKey) 
    {
        this.publicKey = publicKey;
    }

    public String getPublicKey() 
    {
        return publicKey;
    }
    public void setPrivateKey(String privateKey) 
    {
        this.privateKey = privateKey;
    }

    public String getPrivateKey() 
    {
        return privateKey;
    }
    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }
    public void setPaymentMethodId(String paymentMethodId) 
    {
        this.paymentMethodId = paymentMethodId;
    }

    public String getPaymentMethodId() 
    {
        return paymentMethodId;
    }
    public void setPaymentStatus(Long paymentStatus) 
    {
        this.paymentStatus = paymentStatus;
    }

    public Long getPaymentStatus() 
    {
        return paymentStatus;
    }
    public void setPaymentFee(BigDecimal paymentFee) 
    {
        this.paymentFee = paymentFee;
    }

    public BigDecimal getPaymentFee() 
    {
        return paymentFee;
    }
    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }
    public void setPaymentJson(String paymentJson) 
    {
        this.paymentJson = paymentJson;
    }

    public String getPaymentJson() 
    {
        return paymentJson;
    }
    public void setNotifyUrl(String notifyUrl) 
    {
        this.notifyUrl = notifyUrl;
    }

    public String getNotifyUrl() 
    {
        return notifyUrl;
    }
    public void setTradeType(String tradeType) 
    {
        this.tradeType = tradeType;
    }

    public String getTradeType() 
    {
        return tradeType;
    }
    public void setPayStatus(Long payStatus) 
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus() 
    {
        return payStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("channelId", getChannelId())
            .append("channelName", getChannelName())
            .append("channelStatus", getChannelStatus())
            .append("merchantId", getMerchantId())
            .append("orderNo", getOrderNo())
            .append("syncUrl", getSyncUrl())
            .append("asynUrl", getAsynUrl())
            .append("publicKey", getPublicKey())
            .append("privateKey", getPrivateKey())
            .append("payAmount", getPayAmount())
            .append("paymentMethodId", getPaymentMethodId())
            .append("paymentStatus", getPaymentStatus())
            .append("paymentFee", getPaymentFee())
            .append("paymentTime", getPaymentTime())
            .append("paymentJson", getPaymentJson())
            .append("notifyUrl", getNotifyUrl())
            .append("tradeType", getTradeType())
            .append("payStatus", getPayStatus())
            .append("codeUrl", getCodeUrl())
            .toString();
    }
}
